package com.cosmoplat.xikai.business.service;

import com.cosmoplat.xikai.business.domain.DeviceConfig;
import com.cosmoplat.xikai.business.domain.dto.scada.DeviceFaultDto;
import com.cosmoplat.xikai.business.domain.vo.DeviceStatusVo;
import com.cosmoplat.xikai.common.core.domain.AjaxResult;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

/**
 * 设备调用服务接口
 */
public interface DeviceCallService {
    void saveData(String deviceCodes);
    boolean sendCommand(String deviceCode, String identifier,String value);
    boolean runStatusSendCommand(String deviceCode,String typeOfTask,String numberOfTasks);

    /**
     * 获取物料的库存数量
     * @date 10:43 2025/2/7
     * @param deviceCode
     * @param materialCode
     * @return java.math.BigDecimal
     **/
    String getMaterialCodeValue(String deviceCode, String materialCode);
    HashMap<String,String> getCommandReturnValueMap(String deviceCode, List<String> identifierList);

    /**
     * 获取当前设备状态
     * @date 16:51 2025/2/6
     * @param deviceCode
     * @return com.cosmoplat.xikai.business.domain.vo.DeviceStatusVo
     **/
    DeviceStatusVo getDeviceStatus(String deviceCode);

    AjaxResult getTorqueAndPressure(DeviceFaultDto deviceFaultDto);

    void getEnergyConsumptionRate(String deviceCodes);
}
